package com.kaili.basic.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.basic.pojo.dto.MdmDeviceOnlineQueryDto;
import com.kaili.basic.pojo.entity.MdmDeviceOnline;
import com.kaili.basic.pojo.entity.MdmDeviceOnlineExport;
import com.kaili.basic.pojo.vo.MdmDeviceOnlineListVo;
import com.kaili.basic.pojo.vo.MdmDeviceOnlineDetailVo;
import com.kaili.basic.pojo.vo.MdmDeviceOnlineVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: shenliqiang
 * @CreateDate: 2019/7/24 10:48
 * @Version: 1.0
 */
@Mapper
public interface DeviceOnlineMapper extends BaseMapper<MdmDeviceOnline> {
    //添加

    int addMdmDeviceOnline(MdmDeviceOnline mdmDeviceOnline);
    //删除
    int deleteMdmDeviceOnlines(Map<String, Object> map);
    //更新
    int updateMdmDeviceOnline(MdmDeviceOnline mdmDeviceOnline);
    //条件查询
    List<MdmDeviceOnlineListVo> queryMdmDevice(Page<MdmDeviceOnlineListVo> page, MdmDeviceOnlineQueryDto mdmDeviceOnlineQueryDto);

    //导出
    List<MdmDeviceOnlineExport> queryMdmDeviceOnlineExport(MdmDeviceOnlineQueryDto mdmDeviceOnlineQueryDto);
    //查询详细
    MdmDeviceOnlineDetailVo queryOnlineDeviceDetail(Long deviceOnlineId);

    /**
     * @Desc:破解设备
     * @author:zhouyijian
     * @time: 2019/8/5 9:49
     * @return: int
     */
    int getDeviceBreakTotal();

    /**
     * @Desc:设备在线分布图
     * @author:zhouyijian
     * @time: 2019/8/5 11:14
     * @return: java.util.List<com.kaili.basic.pojo.vo.MdmDeviceSignVO>
     */
    List<MdmDeviceOnlineVo> getDeviceOnlineMap();


    /**
     * @Desc:设备状态
     * @author:zhouyijian
     * @time: 2019/8/5 15:34
     * @return: java.util.List<com.kaili.basic.pojo.vo.MdmDeviceOnlineVo>
     */
    List<MdmDeviceOnlineVo> getDeviceStatusTotal();
    MdmDeviceOnline queryOnlineDeviceById(Integer id);
}
